package svgedit.germangui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

import svgedit.germangui.GermanFrame;

/** Shows confirm changes dialog, then exits the application.
 */
@SuppressWarnings("serial")
public class QuitAction extends AbstractAction {

    private GermanFrame germanFrame;

    /** Create this action for the given frame */
    public QuitAction(GermanFrame germanFrame) {
   		super("Beenden");
        this.germanFrame = germanFrame;
    }

    public void actionPerformed(ActionEvent ae) {
        if (germanFrame.confirmSaveChanges())
            System.exit(0);
    }
}
